home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / angelpang.swf / scripts / frame_12 / PlaceObject2_399_262 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2006-06-13  |  2.5 KB  |  92 lines

  1. onClipEvent(enterFrame){
  2.    if(_parent.move_play)
  3.    {
  4.       if(ishit)
  5.       {
  6.          if(this.hit.hitTest(_parent.hero.Hit))
  7.          {
  8.             _parent.canPlay = false;
  9.             _parent.player_move = false;
  10.             _parent.hero.gotoAndStop("die");
  11.          }
  12.          g += _parent.GGG;
  13.          this._x += speedX;
  14.          sn = Math.abs(Math.cos(3.141592653589793 * g / 180));
  15.          this._y = _parent.Hit._y + 25 - sn * dis;
  16.          if(g % 360 == 90 || g % 360 == 270)
  17.          {
  18.             dis = 180;
  19.          }
  20.          if(this.hitTest(_parent.hit_L))
  21.          {
  22.             trace("hitLLLLLLLLLLLLLLL");
  23.             speedX = _root.big2 + zzz_num;
  24.          }
  25.          if(this.hitTest(_parent.hit_R))
  26.          {
  27.             trace("hitRRRRRRRRRR");
  28.             speedX = - _root.big2 + (- zzz_num);
  29.          }
  30.       }
  31.    }
  32.    if(Att_hit)
  33.    {
  34.       if(this.hitTest(_parent.arrow_1.hit))
  35.       {
  36.          ishit = false;
  37.          _parent.ssball5._x = this._x + 10;
  38.          _parent.ssball6._x = this._x - 10;
  39.          _parent.arrow_1.gotoAndStop(1);
  40.          this.play();
  41.       }
  42.       if(this.hitTest(_parent.arrow_2.hit))
  43.       {
  44.          ishit = false;
  45.          _parent.ssball5._x = this._x + 10;
  46.          _parent.ssball6._x = this._x - 10;
  47.          _parent.arrow_2.gotoAndStop(1);
  48.          this.play();
  49.       }
  50.       if(this.hitTest(_parent.arrow_3.hit))
  51.       {
  52.          ishit = false;
  53.          _parent.ssball5._x = this._x + 10;
  54.          _parent.ssball6._x = this._x - 10;
  55.          _parent.arrow_3.gotoAndStop(1);
  56.          this.play();
  57.       }
  58.       if(this.hitTest(_parent.arrow_4.hit))
  59.       {
  60.          ishit = false;
  61.          _parent.arrow_4.gotoAndStop(1);
  62.          _parent.ssball5._x = this._x + 10;
  63.          _parent.ssball6._x = this._x - 10;
  64.          this.play();
  65.       }
  66.       if(this.hitTest(_parent.arrow_5.hit))
  67.       {
  68.          ishit = false;
  69.          _parent.arrow_5.gotoAndStop(1);
  70.          _parent.ssball5._x = this._x + 10;
  71.          _parent.ssball6._x = this._x - 10;
  72.          this.play();
  73.       }
  74.       if(this.hitTest(_parent.arrow_7.hit))
  75.       {
  76.          ishit = false;
  77.          _parent.arrow_7.gotoAndStop(1);
  78.          _parent.ssball5._x = this._x + 10;
  79.          _parent.ssball6._x = this._x - 10;
  80.          this.play();
  81.       }
  82.       if(this.hitTest(_parent.arrow_8.hit))
  83.       {
  84.          ishit = false;
  85.          _parent.arrow_8.gotoAndStop(1);
  86.          _parent.ssball5._x = this._x + 10;
  87.          _parent.ssball6._x = this._x - 10;
  88.          this.play();
  89.       }
  90.    }
  91. }
  92.